$(function(){
    $.ajax({
        method:'get',
        url:'http://chst.vip:1234/api/getinlanddiscount',
        success:function(res){
            let listr = ``
            res.result.forEach(element => {
                listr+=`<li>
                            <a href="http://127.0.0.1:5500/domo/千锋商城项目/html/inlanddiscountProduct.html?productid=${element.productId}">
                                <img src=${element.productImg.match(/[0-9a-zA-Z:/.]+/g)[2]} alt="">
                                <p class="title">${element.productName}</p>
                                <p class="price">${element.productPrice}</p>
                                <p class="from">${element.productFrom}|${element.productTime}</p>
                            </a>
                        </li>`
            });
            $('main ul:eq(0)').html(listr)
           toTop1()
        }
    })
})